#%RAML 1.0
title: 位置相关
baseUri: /api/osinstall/{version}
version: v1
mediaType: application/json

/location/add:
  post:
    description: 增加
    queryParameters:
      Name:
        description: 名称
        type: string
        required: true
      Pid:
        description: 父级ID
        type: number
        required: true
      AccessToken:
        description: 调用登录API时，生成的授权AccessToken。
        type: string
        required: true
    responses:
      200:
        body:
          application/json:
            example: |
              {
                "Status": "success",
                "Message": "",
              }

/location/list:
  post:
    description: 获取列表
    queryParameters:
      Limit:
        description: 页容量
        type: number
        required: true
      Offset:
        description: 从第几行开始
        type: number
        required: true
      Pid:
        description: 父级ID
        type: number
        required: true
    responses:
      200:
        body:
          application/json:
            example: |
              {
                "Status": "success",
                "Message": "",
                "Content":{
                  "list":{}
                  "recordCount":100
                },
              }


/location/view:
  post:
    description: 获取详情
    queryParameters:
      ID:
        description: ID
        type: number
        required: true
    responses:
      200:
        body:
          application/json:
            example: |
              {
                "Status": "success",
                "Message": "",
                "Content":{
                  ...
                },
              }


/location/update:
  post:
    description: 修改
    queryParameters:
      ID:
        description: ID
        type: number
        required: true
      Name:
        description: 名称
        type: string
        required: true
      Pid:
        description: 父级ID
        type: number
        required: true
      AccessToken:
        description: 调用登录API时，生成的授权AccessToken。
        type: string
        required: true
    responses:
      200:
        body:
          application/json:
            example: |
              {
                "Status": "success",
                "Message": "",
              }


/location/delete:
  post:
    description: 删除
    queryParameters:
      ID:
        description: ID
        type: number
        required: true
      AccessToken:
        description: 调用登录API时，生成的授权AccessToken。
        type: string
        required: true
    responses:
      200:
        body:
          application/json:
            example: |
              {
                "Status": "success",
                "Message": "",
              }

